#ifndef LOGDIALOG_H
#define LOGDIALOG_H

#include <QDialog>
#include "log/log.h"
#include <QMap>

namespace Ui {
class LogDialog;
}

class LogDialog : public QDialog , public HIM::LogObserver
{
    Q_OBJECT

public:
    explicit LogDialog(QWidget *parent = nullptr);
    ~LogDialog();

    void update(int, const char *) override;
    void setLogLevelColor(int , const QString &);

private:
    Ui::LogDialog *ui;

    QMap<int,QString> logColorMap;

    const QString colorFrontA{"<font color=\""};
    const QString colorFrontB{"\">"};
    const QString colorFrontEnd{"</font>"};
};

#endif // LOGDIALOG_H
